package com.jkoss.biz.imp.kc;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.jkoss.biz.kc.subbiz;
import com.jkoss.dao.kc.SubjectMapper;
import com.jkoss.pojo.kc.Subject;
import com.jkoss.tool.Page;

@Component
public class subbizimp implements subbiz{

	@Autowired
	private SubjectMapper sdao;
	

	@Override
	public List<Subject> findsubByAll(Page<Subject> page) {
		// TODO Auto-generated method stub
		return sdao.findByAll(page);
	}


	@Override
	public Subject findsubByOne(String sbid) {
		
		return sdao.findByOne(sbid);
	}


	@Override
	public int upkcmodel(Subject sub) {
		// TODO Auto-generated method stub
		return sdao.updateByPrimaryKey(sub);
	}


	@Override
	public int addsub(Subject sub) {
		// TODO Auto-generated method stub
		return sdao.insert(sub);
	}


	@Override
	public int delsub(String sbid) {
		// TODO Auto-generated method stub
		
		int sbID  = Integer.parseInt(sbid);
		return sdao.deleteByPrimaryKey(sbID);
	}


	@Override
	public List<Subject> findsubByAll2() {
		
		return sdao.findByAll2();
	}


	@Override
	public void Test001() {
		System.out.println("222");
	}

	
}
